﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace OpenCvApplication.View.CommonView
{
    public partial class FrmShowImage : FrmBase
    {
        public FrmShowImage()
        {
            InitializeComponent();
        }
        public FrmShowImage(Image image) : this()
        {
            SetImage = image;
        }
        public Image SetImage
        {
            set
            {
                try
                {
                    this.pictureBox1.Image?.Dispose();
                    this.pictureBox1.Image = value;
                }
                catch (Exception ex)
                {
                    Trace.WriteLine(ex.Message);
                }
            }
        }
        private void FrmShowImage_Load(object sender, EventArgs e)
        {

        }

        private void FrmShowImage_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Dispose();
        }
    }
}
